package com.zw.yzk.kabu.internal.module;

import com.zw.yzk.kabu.data.repository.RefreshUserInfoRepository;
import com.zw.yzk.kabu.domain.executor.ExecutionThread;
import com.zw.yzk.kabu.domain.executor.ThreadExecutor;
import com.zw.yzk.kabu.domain.interactor.DefaultUseCase;
import com.zw.yzk.kabu.domain.repository.Repository;
import com.zw.yzk.kabu.domain.repository.UseCase;

import javax.inject.Named;

import dagger.Module;
import dagger.Provides;

/**
 * Created by zhanwei on 2016/12/24.
 */

@Module
public class RefreshUserInfoModule {

    @Provides
    @Named("refreshUserInfoRepository")
    Repository provideRepository(RefreshUserInfoRepository repository) {
        return repository;
    }

    @Provides
    @Named("refreshUserInfoUseCase")
    UseCase provideUseCase(ExecutionThread thread, ThreadExecutor executor, @Named("refreshUserInfoRepository")Repository repository) {
        return new DefaultUseCase(thread, executor, repository);
    }
}
